<?php
require_once "managerSession.php";

$Item="系统设置";
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>娱乐会所吧台管理系统</title>
    <style>
        #options a{margin: 15px 0}
    </style>
    <?php include_once "link.php"; ?>
    <script src="../static/utf8-php/ueditor.config.js"></script>
    <script src="../static/utf8-php/ueditor.all.js"></script>
    <script src="../static/utf8-php/lang/zh-cn/zh-cn.js"></script>
</head>
<body class="container">
<?php require_once "Nav.php"; ?>
<div class="main">
    <?php include_once "menu.php"; ?>
    <div class="pr inlb bd col-xs-10">
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation"><a id="def" href="#"  onclick="downLoad(this)">公司介绍</a></li>
            <li role="presentation"><a href="#" onclick="downLoad(this)">服务内容介绍</a></li>
            <li role="presentation"><a href="#" onclick="downLoad(this)">操作说明文档</a></li>
            <li role="presentation"><a href="#" onclick="downLoad(this)">业绩考核文档</a></li>
            <li role="presentation"><a href="#" onclick="downLoad(this)">公司活动</a></li>
            <li role="presentation"><a href="#" onclick="downLoad(this)">公司通知</a></li>
        </ul>
        <div>
            <div style="width:100%;">
                <script id="editor" style="width:100%;height:600px;"></script>
            </div>
        </div>
        <button type="button" class="btn btn-primary pull-right" onclick="upLoad()" data-toggle="modal" data-target="#message" style="font-size: 30px;margin: 15px">确认提交</button>

    </div>
</div>
<?php
dialogHeader("message", "#", "提示","sm");?>
<div id="article" class="modal-body">

</div>
<?php dialogFooter(0);
?>
<script>
    var ue = UE.getEditor('editor');
    function getContent() {
        return UE.getEditor('editor').getContent()
    }
    function setContent(content) {
        UE.getEditor('editor').setContent(content,false);
    }
    UE.getEditor('editor').ready(function () {
        downLoad(def)
    })
    function downLoad(tag){
        $(".pr li").attr("class","")
        $(tag.parentNode).attr("class","active")
        $.post("getMessage.php",{tag:tag.innerHTML},function (o) {
            setContent(o)
        })
    }
    function upLoad() {
        var tag=$(".active a").text()
        $.post("getMessage.php",{tag:tag,details:getContent()},function (o) {
            $("#article").html(o)
        })
    }
    $(function () {
        $(".lst").css("margin-top","40px")
    })
</script>
</body>
</html>
